/*
 * Copyright (c) 2003-2005
 * XDoclet Team
 * All rights reserved.
 */
package org.xdoclet.plugin.hibernate;

import java.net.URL;

import org.generama.JellyTemplateEngine;
import org.generama.MetadataProvider;
import org.generama.Plugin;
import org.generama.QDoxCapableMetadataProvider;
import org.generama.WriterMapper;

public class FullHibernateConfigTestCase extends AbstractHibernateConfigTestCase {
    protected URL getExpected() {
        return getResourceRelativeToThisPackage("config/full.cfg.xml");
    }

    protected Plugin createPlugin(MetadataProvider metadataProvider, WriterMapper writerMapper) {
        HibernateConfigPlugin plugin = new HibernateConfigPlugin(new JellyTemplateEngine(),
                (QDoxCapableMetadataProvider) metadataProvider, writerMapper);
        plugin.setJdbcdriver("foo.bar");
        plugin.setJdbcurl("blurge.bang");
        plugin.setJdbcusername("blam");
        plugin.setJdbcpassword("blem");
        plugin.setJdbcautocommit("true");
        plugin.setJdbcautoreconnect("true");
        plugin.setJdbcautoreconnectforpools("true");
        plugin.setJdbcisconnectionvalidationrequired("true");
        plugin.setJdbcpoolsize("100");
        plugin.setJdbcfetchsize("50");
        plugin.setJdbcbatchsize("25");
        plugin.setJdbcbatchversioneddata("foo");
        plugin.setJdbcusescrollableresultset("true");
        plugin.setJdbcusestreamsforbinary("false");
        plugin.setJdbcusegetgeneratedkeys("true");
        plugin.setJdbcisolation("glee");
        plugin.setUsereflectionoptimizer("true");
        plugin.setConnectionprovider("just.a.class");
        plugin.setJndidatasource("glemglam");
        plugin.setJndiurl("glarch");
        plugin.setJndiclass("another.class");
        plugin.setDialect("dialect");
        plugin.setDefaultschema("x");
        plugin.setJndisessionfactoryname("vvv");
        plugin.setUseouterjoin("false");
        plugin.setMaxfetchdepth("25");
        plugin.setCacheprovider("bla.bla");
        plugin.setCacheuseminimalputs("true");
        plugin.setCacheusequerycache("true");
        plugin.setCachequerycachefactory("factory");
        plugin.setCacheregionprefix("qqq");
        plugin.setTransactionfactory("cc.cc");
        plugin.setJtausertransaction("ccc");
        plugin.setTransactionmanagerlookup("a.a");
        plugin.setQuerysubstitutions("sss");
        plugin.setShowsql("true");
        plugin.setHbm2ddlauto("vvv");
        plugin.setC3p0maxsize("3");
        plugin.setC3p0minsize("1");
        plugin.setC3p0timeout("10");
        plugin.setC3p0maxstatements("90");
        plugin.setC3p0idletestperiod("60");
        plugin.setC3p0acquireincrement("1");
        plugin.setCurrentsessioncontextclass("jta");
        plugin.setUsesecondlevelcache("true");
        return plugin;
    }
}